import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import fire from '@dfeidao/atom-web/msg/fire';
import error from '@dfeidao/atom-web/msgbox/error';

export default async function a008(fd: IFeidaoAiBrowserComponent) {
	// todo
	// 点击我收到的删除按钮时触发
	const chk_list1 = fd.data.node.querySelectorAll('[data-id="chk-list1"]:checked');
	if (chk_list1.length < 1) {
		error("请选择一条数据，进行操作!");
	} else {
		const chkList1 = Array.from(chk_list1) as HTMLInputElement[];
		const arr = chkList1.map((n) => {
			return n.getAttribute('data-no');
		});
		const nos = arr as string[];
		const flag = 2;
		fire('zj-000005', 'a001', nos, flag);
	}
}
